// $Id: PluginSettingsAttribute.cs 64 2008-05-06 18:29:47Z nvivo $

using System;
using System.Collections.Generic;
using System.Text;

namespace DBLGen
{
    /// <summary>
    /// Defines the settings class and editor for a plugin.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class PluginSettingsAttribute : Attribute
    {
        public PluginSettingsAttribute(Type settingsType)
            : this(settingsType, null)
        { }

        public PluginSettingsAttribute(Type settingsType, Type editorType)
        {
            if (settingsType == null)
                throw new ArgumentNullException("settingsType");

            if (editorType == null)
                editorType = typeof(UI.GenericPluginSettingsEditor);

            _settingsType = settingsType.AssemblyQualifiedName;
            _editorType = editorType.AssemblyQualifiedName;
        }

        private string _settingsType;
        private string _editorType;

        public string SettingsType
        {
            get
            {
                return _settingsType;
            }
        }

        public string EditorType
        {
            get
            {
                return _editorType;
            }
        }
    }
}
